<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单位管理</title>
    <link rel="stylesheet" href="../plugins/zTree/metro.css" type="text/css">
</head>
<body>
<div class="box">
    <div class="box-body">
        <table id="mainDataTables" class="table table-bordered table-striped" cellspacing="0" width="100%">
            <thead>
            <tr>
                <th><input onchange="$.checkChange()" type="checkbox" id="batch_check"></th>
                <th>序号</th>
                <th>单位类型</th>
                <th>单位名称</th>
                <th>单位负责人</th>
                <th>负责人电话</th>
                <th>单位电话</th>
                <th>单位状态</th>
                <th>更多</th>
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>
<!--添加编辑模态框-->
<div id="modal-org" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="label-org"
     aria-hidden="true">
    <div class="modal-dialog" style="width: 407px;">
        <div class="modal-content">
            <form id="form-org" name="form-org" class="form-horizontal" role="form" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                            onclick="$.clearModal($('#form-org'), $('#modal-org'))">
                        <span aria-hidden="true">&times;</span></button>
                    <b class="modal-title" id="label-org"></b>
                </div>
                <div class="modal-body">
                    <div class="form-group" id="orgTypeDiv">
                        <label for="orgType" class="col-sm-3 control-label ">单位类型</label>
                        <div class="col-sm-9">
                            <select class="form-control" id="orgType" name="orgType">
                                <option value="0">维护单位</option>
                                <option value="1">监管单位</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgName" class="col-sm-3 control-label ">单位名称</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="OrgName" name="orgName"
                                    placeholder="单位名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgPerson" class="col-sm-3 control-label ">单位负责人</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control  " id="orgPerson" name="orgPerson"
                                   placeholder="单位负责人">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgPersonMobile" class="col-sm-3 control-label ">负责人电话</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgPersonMobile" name="orgPersonMobile"
                                   placeholder="负责人电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgMobile" class="col-sm-3 control-label ">单位电话</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgMobile" name="orgMobile"
                                   placeholder="单位电话">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgFax" class="col-sm-3 control-label ">单位传真</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgFax" name="orgFax"
                                   placeholder="单位传真">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgWeb" class="col-sm-3 control-label ">单位网站</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgWeb" name="orgWeb"
                                   placeholder="单位网站">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgEmail" class="col-sm-3 control-label ">单位邮箱</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgEmail" name="orgEmail"
                                   placeholder="单位邮箱">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgAddress" class="col-sm-3 control-label ">单位地址</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="orgAddress" name="orgAddress"
                                   placeholder="单位地址">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="orgRemark" class="col-sm-3 control-label ">单位描述</label>
                        <div class="col-sm-9">
                            <textarea class="form-control" id="orgRemark" name="orgRemark" rows="3"
                                      style=" resize: none;" placeholder="单位描述"></textarea>
                        </div>
                    </div>

                    <input type="hidden" id="orgId" name="orgId"/>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning pull-left btn-flat" data-dismiss="modal"
                            onclick="$.clearModal($('#form-org'), $('#modal-org'))"><i class="fa fa-trash-o"></i> 取消
                    </button>
                    <button type="submit" class="btn btn-primary btn-flat"><i class="fa fa-save"></i> 保存
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>

<!--选择监管单位的模态框-->
<div class="modal fade" id="mainOrg-modal" tabindex="-1" role="dialog"
     aria-labelledby="mapModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        onclick="$('#mainOrg-modal').modal('hide')">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="mapModalLabel">监管单位选择</h4>

            </div>
            <div class="modal-body" style="max-height: 550px;overflow: auto;">
                <div class="row">
                    <div class="col-md-6">
                        <div class="col-md-12 text-center" style="font-size: 18px;margin-bottom: 20px;">
                            <label>已选监管单位</label></div>
                        <div class="col-md-12">
                            <table id="MainOrgDt"
                                   class="table table-striped table-bordered"
                                   cellspacing="0" width="100%">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>单位名称</th>
                                    <th>移除</th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="col-md-12 text-center" style="font-size: 18px;margin-bottom: 20px;">
                            <label>候选监管单位</label></div>
                        <div class="col-md-12">
                            <table id="CandidateMainOrgDt"
                                   class="table table-striped table-bordered"
                                   cellspacing="0" width="100%">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>单位名称</th>
                                    <th>添加</th>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger btn-flat"
                        onclick="$('#mainOrg-modal').modal('hide')">
                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    关闭
                </button>
            </div>
            </form>
        </div>
    </div>
</div>

<div class="modal fade" id="information-modal" tabindex="-1" role="dialog"
     aria-labelledby="informationLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        onclick="$('#information-modal').modal('hide')">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">更多内容</h4>

            </div>
            <div class="modal-body">
                <table class="table table-bordered table-striped">
                    <tr>
                        <td class="col-sm-3"><b>单位网址</b></td>
                        <td><input class="form-control" id="web" readonly=""></td>
                    </tr>
                    <tr>
                        <td><b>单位邮箱</b></td>
                        <td><input class="form-control" id="email" readonly=""></td>
                    </tr>
                    <tr>
                        <td><b>单位地址</b></td>
                        <td><input class="form-control" id="address" readonly=""></td>
                    </tr>
                    <tr>
                        <td><b id="t">公司关系</b></td>
                        <td><input class="form-control" id="t2" readonly=""></td>
                    </tr>
                    <tr>
                        <td>单位描述</td>
                        <td>
                            <div style="height:90px;text-align: left;" id="remark"></div>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary  btn-flat"
                        onclick="$('#information-modal').modal('hide')">
                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    关闭
                </button>
            </div>
            </form>
        </div>
    </div>
</div>

<div id="modal-menu" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="label-menu"
     aria-hidden="true">
    <div class="modal-dialog" style="width: 300px;">
        <div class="modal-content">
            <form id="form-menu" name="form-menu" class="form-horizontal" role="form" method="post">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                            onclick="$.clearModal($('#form-menu'), $('#modal-menu'))">
                        <span aria-hidden="true">&times;</span></button>
                    <b class="modal-title" id="label-menu"></b>
                </div>
                <div class="modal-body">
                    <div class="zTreeDemoBackground left">
                        <ul id="treeDemo" class="ztree" style="padding-left: 45px;"></ul>
                    </div>
                </div>
                <div class="modal-body">
                    <div class="modal-footer">
                        <button type="button" class="btn btn-warning pull-left btn-flat" data-dismiss="modal"
                                onclick="$.clearModal($('#form-menu'), $('#modal-menu'))"><i class="fa fa-trash-o"></i>
                            取消
                        </button>
                        <button type="button" class="btn btn-primary btn-flat" onclick='getChoosed()'><i
                                class="fa fa-save"></i> 保存
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript" src="../plugins/zTree/jquery.ztree.all-3.5.min.js"></script>
<script src="system/company.js"></script>
</body>
</html>